package 并发编程18;

/**
 * @author idea
 * @data 2019/2/17
 */
class t implements Runnable{

    @Override
    public void run() {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("thsi is t");
    }
}
public class Demo {

    public static void main(String[] args) throws InterruptedException {
        System.out.println("初始化---");
        Thread t=new Thread(new t());
        t.start();
        t.notify();
//        synchronized (t){
//            t.wait();
//        }
        t.join();
//        Thread.currentThread().join();
        System.out.println("----end----");
    }
}
